﻿<%@ Page Language="C#" MasterPageFile="~/Enterprise/Master/AdminMaster.Master" AutoEventWireup="true"
    CodeBehind="InvoiceDistribution.aspx.cs" Inherits="HZ.DrugTrade.Web.Enterprise.InvoiceManage.InvoiceDistribution"
    Title="发票配送详情" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="tabnav">
        <ul>
            <li class="active"><a href="javascript:void(0);">添加配送产品</a></li>
        </ul>
    </div>
    <div id="tabcontent">
        <table class="querylist">
            <tr>
                <td>
                    <table class="querylist">
                        <tr>
                            <td align="right">
                                产品名称：&nbsp;
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtGoodsName" runat="server"></asp:TextBox>
                            </td>
                            <td align="right">
                                规格型号：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtOutLookc" runat="server"></asp:TextBox>
                            </td>
                            <td align="right">
                                材质：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtMaterial" runat="server"></asp:TextBox>
                            </td>
                            
                            <td rowspan="2">
                                <hz:HzButton ID="btnSelect" runat="server" Text="查 询" OnClick="btnSelect_Click" CssClass="btn" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                采购单：</td>
                            <td align="left">
                                <asp:TextBox ID="txtOrderName" runat="server"></asp:TextBox>
                            </td>
                            <td align="right">
                                配送时间：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtTimeFrom" runat="server" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd '})"
                                    MaxLength="10" Width="62px"></asp:TextBox>-<asp:TextBox ID="txtTimeTo" runat="server"
                                        onFocus="WdatePicker({dateFmt:'yyyy-MM-dd '})" MaxLength="10" Width="62px"></asp:TextBox>
                            </td>
                            <td align="right">
                                生产企业：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtCompanyName" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">拼音码：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtpinyincode" runat="server"></asp:TextBox>
                            </td>

                            <td align="right">
                                <asp:Label Text="项目：" ID="lblProjectid" runat="server" />
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="ddlProjectid" runat="server">
                                    <asp:ListItem Value="0002">2014年内蒙古自治区网上高值医用耗材阳光采购项目</asp:ListItem>
                                    <asp:ListItem Value="0001">2012年内蒙古自治区网上医用耗材采购项目</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        </table>
                </td>
            </tr>
        </table>
    </div>
    <asp:GridView ID="gvwInvoice" class="mainlist" runat="server" AutoGenerateColumns="False"
        EmptyDataText="暂无符合条件的数据！">
        <Columns>
            <asp:TemplateField HeaderText=" ">
                <HeaderTemplate>
                    <input id="addTable_chkAll" name="addTable_chkAll" type="checkbox" onclick="SelectAllCheckboxes(this,'ctl00_ContentPlaceHolder1_gvwInvoice','addTable_chkAll'); " />
                </HeaderTemplate>
                <ItemTemplate>
                    <input type="checkbox" name="ChkOrderID" id="ChkOrderID" value='<%#Eval("DistributionSerialID")%>'
                    <%#Eval("DistributeState").ToString()=="1"?"":"disabled='disabled'"%>   onclick="chkChecked(this,'ctl00_ContentPlaceHolder1_gvwInvoice','ChkOrderID');" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="OrderName" HeaderText="采购单名称" ReadOnly="true" />
            <%--<asp:BoundField DataField="TotalAmount" HeaderText="采购总额" ReadOnly="true" DataFormatString="{0:F2}"/>--%>
            <asp:BoundField DataField="HospitalName" HeaderText="采购医疗机构" ReadOnly="true" />
            <asp:BoundField DataField="CompanyName_SC" HeaderText="生产企业" ReadOnly="true" />
            <asp:BoundField DataField="GoodsName" HeaderText="产品名称" ReadOnly="true" />
            <asp:BoundField DataField="Outlookc" HeaderText="规格型号" ReadOnly="true" />
            <asp:BoundField DataField="Material" HeaderText="材质" NullDisplayText="无" />
            <%--<asp:BoundField DataField="Price" HeaderText="采购价格" ReadOnly="true" DataFormatString="{0:N4}" />--%>
            <asp:TemplateField HeaderText="采购价格">
                <ItemTemplate>
                    <asp:Label ID="lblPrice" runat="server" Text='<%#HZ.DrugTrade.Web.Function.FormPrice(Eval("ProjectID"), Eval("Price")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="PurchaseCount" HeaderText="采购数量" ReadOnly="true" />
            <asp:BoundField DataField="Dis_DistributeCount" HeaderText="批配送量" ReadOnly="true" />   <%--updated by lhl 2009-09-08 显示该批次所配送的数量和入库数量--%>
            <asp:BoundField DataField="Dis_WarehouseCount" HeaderText="批入库量" ReadOnly="true" />
            <%--<asp:BoundField DataField="returncount" HeaderText="退货数量" />--%>
            <%--<asp:TemplateField HeaderText="采购金额">
                <ItemTemplate>
                <%#Decimal.Parse(Eval("Price").ToString()) * Decimal.Parse(Eval("Dis_WarehouseCount").ToString())%>
                </ItemTemplate>
            </asp:TemplateField>--%>
            <asp:BoundField DataField="Settlecount" HeaderText="可结算量" ReadOnly="true" />
            <asp:BoundField DataField="SettleAmount" HeaderText="可结算金额" ReadOnly="true" />
            <asp:TemplateField HeaderText="可结算金额">
                <ItemTemplate>
                    <asp:Label ID="lblSettleAmount" runat="server" Text='<%#HZ.DrugTrade.Web.Function.FormPrice(Eval("ProjectID"), Eval("SettleAmount")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="BatchRecordID" HeaderText="批号" ReadOnly="true" />
            <asp:BoundField DataField="DistributeTime" HeaderText="配送时间" ReadOnly="true" DataFormatString="{0:yyyy-MM-dd}" />
        </Columns>
    </asp:GridView>
    <div class="page">
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_OnPageChanged">
        </webdiyer:AspNetPager>
    </div>
    <div class="listip">
        <ul>
            <li>提示：<span>请先选择要添加的项，然后点击添加。</span></li>
        </ul>
    </div>
    <div class="listctrl">
        <hz:HzButton ID="btnAdd" runat="server" Text="加入发票" OnClientClick="return checkSelectedItems('ctl00_ContentPlaceHolder1_gvwInvoice','请至少选择一条配送单！') && confirm('确定添加吗？');"
            OnClick="btnAdd_Click" CssClass="btn" ToolTip="点击添加" OperateType="编辑" />
        &nbsp;<hz:HzButton ID="btnFinish" runat="server" Text="返回发票" OnClick="btnFinish_Click"
            CssClass="btn" ToolTip="返回发票页面" OperateType="编辑" />
            &nbsp;<hz:HzButton ID="btnExport" runat="server" Text="导出Excel" CssClass="btn" ToolTip="导出Excel"
                        OnClick="btnExport_Click" />
    </div>
</asp:Content>
